package cn.itcast.bos.web.action.base;

import cn.itcast.bos.domain.base.TakeTime;
import cn.itcast.bos.service.base.TakeTimeService;
import cn.itcast.bos.util.base.BaseAction;
import com.opensymphony.xwork2.ActionContext;
import org.apache.struts2.convention.annotation.Action;
import org.apache.struts2.convention.annotation.Namespace;
import org.apache.struts2.convention.annotation.ParentPackage;
import org.apache.struts2.convention.annotation.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.context.annotation.Scope;
import org.springframework.stereotype.Controller;
import schemasMicrosoftComOfficeOffice.STInsetMode;

import java.util.List;

@Controller
@Scope("prototype")
@Namespace("/")
@ParentPackage("json-default")
public class TakeTimeAction  extends BaseAction<TakeTime>{
    @Autowired
	private TakeTimeService takeTimeService;

    @Action(value = "takeTime_findAll",
    results = {@Result(name = "success",type = "json")})
    public String findAll(){
        List<TakeTime> takeTimes = takeTimeService.findAll();
        ActionContext.getContext().getValueStack().push(takeTimes);
        return  SUCCESS;
    }

}
